using System.Collections.Concurrent;

namespace Pinwheel.Kernel
{
    internal static class Global
    {
        public const string DefaultService = "Default";
        
        
        public static ConcurrentQueue<MessageQueue> MessageQueues = new ConcurrentQueue<MessageQueue>();
        
        public static ConcurrentDictionary<ISocketSession, PID> SocketSession2PidMap = new ConcurrentDictionary<ISocketSession, PID>();
        public static ConcurrentDictionary<PID, IConnection> ClientConnectionMap = new ConcurrentDictionary<PID, IConnection>();
        public static ConcurrentDictionary<PID, IConnection> NodeConnectionMap = new ConcurrentDictionary<PID, IConnection>();
        
        // public static IServiceManager ServiceManager { get; set; }
        // public static TaskFactory TaskFactory => ServiceManager is ServiceManager sm ? sm.TaskFactory : Task.Factory;
    
        public static Rpc Rpc { get; set; } = new Rpc();


    }
}